import unittest

from parameterized import parameterized

from api.ihrm_login import Ihrm
from app import APP
from common.ihrm_login_assert import assert_login
from common.ihrm_login_json import Login


class Ihrm_LoginA(unittest.TestCase):

    list = APP + "/data/ihrm_login.json"
    @parameterized.expand(Login(list))
    def test01_ihrm(self, data, status_code, success, code, message):
        li = Ihrm.ihrm_login(data)
        print(li.json())
        assert_login(self, li, status_code, success, code, message)
